
import os
import svn
import project

#Very weak verification that svn dir exists as specified.
#this script could perform a checkout of the code if it was not present
#but for now it seems far earlier to just make the user
#check the directory out, dealing with all authentication
#issues, etc. 
def start(proj, log):
    dir = proj.getSVNDir()
    fullDir = proj.projectDir + dir
    if len(os.listdir(fullDir)) > 0:
        log.write("svnDir is given and points to a directory with some content.")
        return
    #TODO: Check that SVN exists at SVN URL using pysvn
    else:
        project.ProjectError("svn dir: %s seems to be emtpy" % svnDir)
